function validate(){
	
	var subject = document.getElementById('txtSubject');
	var grade = document.getElementById('txtGrade');
	var fee = document.getElementById('txtFee');
	
	   
			if(notEmpty(subject, "Subject cannot be empty")){
				if(notEmpty(grade, "Grade cannot be empty")){
					if(isNumeric(grade,"Grade Should be Numeric")){
			           if(notEmpty(fee, "Fee cannot be empty")){
	                          if(isNumeric(fee,"Fee Should be Numeric")){
					                   loadXMLDoc()
					 
							      }
								  
							  return false;
							  }
					   return false;
					   }
				  return false;
				  }
				return false;
				}
		  return false;
		  }
	 
	  
	  function loadXMLDoc()
{


if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("ajaxDiv").innerHTML=xmlhttp.responseText;
	
	
    }
  }

    
    var id = document.getElementById('txtId').value;
	var subject = document.getElementById('txtSubject').value;
	var grade = document.getElementById('txtGrade').value;
	var fee = document.getElementById('txtFee').value;
	
	var queryString ="?id=" + id +"&subject="+subject+ "&grade=" +grade +"&fee="+fee;
	
xmlhttp.open("GET","../logic/update/subject_code_update.php"+queryString ,true);
xmlhttp.send();
}


function backxx()
                {

	var startrow=document.getElementById('startrow').value;
	var tag=document.getElementById('tag').value;
	
	if(tag ==1){
		
		document.location="../admin/admin_home.php?tab=subject_code_search&page="+startrow;
		}else {
			document.location="subject_code_searchx.php?page="+startrow;
			}
	
	
	
	}

